package com.elong.businesstravel.protocol.order;

import org.apache.http.Header;
import org.json.JSONObject;

import com.elong.businesstravel.entitys.AlipayResult;
import com.elong.businesstravel.protocol.baseresponse.BaseELongJsonHttpResponse;
/**
 * 创建订单返回
 * @author lenovo
 *
 */
public class CreateOrderResponse extends BaseELongJsonHttpResponse {

	public int status = 1;
	public String resultTextString;
	
	public AlipayResult alipayResult = new AlipayResult();
	
	@Override
	public void onSuccess(int statusCode, Header[] headers,
			JSONObject mainJsonObject) throws Throwable {
		JSONObject responseJsonObject = mainJsonObject.optJSONObject("response");
		status = responseJsonObject.optInt("status", 1);
		resultTextString = responseJsonObject.optString("resulttext", "");
		
		alipayResult.uscore = responseJsonObject.optString("uscore", "");
		alipayResult.returnurl= responseJsonObject.optString("returnurl", "");
		alipayResult.redrecturl = responseJsonObject.optString("redrecturl", "");
		alipayResult.status = responseJsonObject.optString("status", "");
		alipayResult.resulttext = responseJsonObject.optString("resulttext", "");
	}

}
